//
//  OncewayObstacle.h
//  StarBugs
//
//  Created by ?? ? on 3/28/12.
//  Copyright 2012 antisword@playorca.com. All rights reserved.
//

#ifndef __OncewayObstacle_h__
#define __OncewayObstacle_h__

#include "Object/ObjectSprite.h"

class OncewayObstacle : public ObjectSprite
{
private:
    b2World *worldTmp;
    int closeCnt;
    bool closeFlg;
public:
    OncewayObstacle();
    
    virtual void setBodyAngle(bool isInv);
    virtual void setBody(b2World* _worlde);
    virtual void removeBody(b2World *_world);
    virtual void resetObstacle();
    
    void startCloseDoor(b2World *_world);
    void closeTick(float dt);
    void call_close();
    bool checkThrow(CCPoint pt);
};

#endif//__OncewayObstacle_h__